﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using TCDL.GLOBAL;
using TCDL.BUS;

namespace TCDL
{
    public partial class frmQuanLyTau : Form
    {
        public frmQuanLyTau()
        {
            InitializeComponent();
            XemDSBUS ds = new XemDSBUS();
            cbxLoaiTau.DataSource = ds.XemDS("sp_XemDSLoaiTau", null, 0);
            cbxLoaiTau.DisplayMember = "TenLoaiTau";
            cbxLoaiTau.ValueMember = "MaLoaiTau";
        }

        private void btnThemLenLich_Click(object sender, EventArgs e)
        {
            int iMaLT = Int32.Parse(cbxLoaiTau.SelectedValue.ToString());
            int iCount = 2;
            gConnect[] gCon = new gConnect[iCount];
            gCon[0] = new gConnect("@maLoaiTau", iMaLT);
            gCon[1] = new gConnect("@tenTau", txtTenTau.Text);

            XemDSBUS ds = new XemDSBUS();
            ds.ThemDS("sp_ThemTau", gCon, iCount);
        }

        private void frmQuanLyTau_Load(object sender, EventArgs e)
        {

        }
    }
}
